<!-- 菜单栏 -->
<template>
  <div class="outer">
    <el-menu
      unique-opened
      default-active="1"
      class="el-menu-vertical-demo"
      @select="handleOpen"
      background-color="#20222a"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item index="1">
        <span slot="title">用户管理</span>
      </el-menu-item>
      <el-menu-item index="2">
        <span slot="title">分类管理</span>
      </el-menu-item>
      <el-menu-item index="3">
        <span slot="title">商品管理</span>
      </el-menu-item>
      <el-menu-item index="4">
        <span slot="title">优惠券管理</span>
      </el-menu-item>
      <el-menu-item index="5">
        <span slot="title">订单管理</span>
      </el-menu-item>
      <el-menu-item index="6">
        <span slot="title">数据统计</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {};
  },
  watch: {},
  computed: {},
  methods: {
    // 选择的类
    handleOpen(key) {
      this.$emit("selectIndex", key);
    },
  },
  created() {},
  mounted() {},
};
</script>
<style lang="scss" scoped>
.outer {
  .el-menu-vertical-demo {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100%;
    z-index: 1025;
  }
}
</style>